﻿using System;
using System.ComponentModel.DataAnnotations;
using System.Runtime.Serialization;
using System.ComponentModel.DataAnnotations.Schema;

namespace HobSoft.SoccerBet2014.Domain.Models
{
    using Core;
    [DataContract]
    [Serializable]
    public class GameMapping : IModel
    {
        [Required]
        [Key]
        [PrimaryKey]
        [DataMember(IsRequired = true)]
        [DatabaseGenerated(DatabaseGeneratedOption.Identity)]
        public long Key
        {
            get;
            set;
        }
        

        private int _eventID;
        [Required]
        [DataMember(IsRequired = true)]
        public int EventID
        {
            get { return _eventID; }
            set { _eventID = value; }
        }

        private byte _bmId;
        [Required]
        [DataMember(IsRequired = true)]
        public byte BmID
        {
            get { return _bmId; }
            set { _bmId = value; }
        }

        private string _gameID;
        [MaxLength(50)]
        [MinLength(1)]
        [DataMember(IsRequired = true)]
        public string GameID
        {
            get { return _gameID; }
            set { _gameID = value; }
        }

        private bool? _teamReversal;
        [DataMember]
        public bool? TeamReversal
        {
            get { return _teamReversal; }
            set { _teamReversal = value; }
        }


        private DateTime? _lastUpdateTime;
        [DataMember]
        public DateTime? LastUpdateTime
        {
            get { return _lastUpdateTime; }
            set { _lastUpdateTime = value; }
        }
    }
}
